package com.yang.aiDoctor.controller;

import com.yang.aiDoctor.bean.ChatRecord;
import com.yang.aiDoctor.service.ChatRecordService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/record")
public class RecordController {
    @Resource
    private ChatRecordService chatRecordService;

    @GetMapping("/getRecordList")
    public List<ChatRecord> getRecordList(@RequestParam String userName) {
       return  chatRecordService.getChatRecordList(userName);
    }

}
